
public class PaxosConsts {

	// Code usage initializations
	public static final int ARG_NODE_PID_PORT = 1;
	public static final int ARG_NODE_DROP_PROB = 2;
	public static final int ARG_NODE_ROLE = 0;
	public static final int ARG_NODE_HOST = 3;
	public static final int ARG_NODE_TIMEOUT = 4;
	public static final int ARG_NODE_RETRY = 5;
	
	// Paxos initializations
	public static int NUM_PEERS = 0;
	public static final int PROBABILTY_BOUND = 10;
	public static final int LEADER_RESEND_BOUND = 5;
	
	// Paxos peer roles
	public static final int PLAY_ACCEPTOR = 1;
	public static final int PLAY_LEADER = 0;
	public static final int PLAY_CLIENT = 2;
	
	// Paxos messages
	public static final String PREPARE = "PREPARE";
	public static final String PREPARE_REJECT = "PREPARE_REJECT";
	public static final String ALREADY_PROCESSED = "ALREADY_CHOSEN";
	public static final String ALREADY_LEARNED = "ALREADY_LEARNED";
	public static final String PROMISE = "PROMISE";
	public static final String ACCEPT = "ACCEPT";
	public static final String CHOSEN = "CHOSEN";
	public static final String CLIENT_REQ = "CLIENT_REQ";
	public static final String CLIENT_RSP = "CLIENT_RSP";
	public static final String LEARN = "LEARN";

	// Client/User interaction
	public static final String WITHDRAW = "withdraw";
	public static final String DEPOSIT = "deposit";
	public static final String BALANCE = "balance";
	public static final String EXIT = "exit";
	public static final String WITHDRAW_RESPONSE = "withdraw done";
	public static final String DEPOSIT_RESPONSE = "deposit done";
	public static final String BALANCE_RESPONSE = "current balance is Rs.";
	
	
	// Paxos in operations constants
	public static final int SESSION_DONE = 0;
	public static final int LEADER_DIED = 1;
	public static final int DEAD_PROCESS_PORT = 0;
	public static final int INIT = -1;
	public static final int CONTINUE = -1;
	public static final int INSTANCE_DONE = 2;
	
	// Misc 
	public static final int FIRST_REQ = 0;
	public static final int NO_ELEMENT = 0;
	public static final int NO_ELE_INT = -1;
	public static final String NO_ELE_STR = " ";
	public static final int INSTANCE_SIZE = 20;
	public static final int UPSET_SIZE = 5;
	public static final int MESG_SIZE = 1000;
	
	// Paxos Message element ordering
	public static final int PM_NUM_FIELDS = 10;
	public static final int PM_MSG_TYPE = 0;
	public static final int PM_SENDER_ID = 1;
	public static final int PM_PROPOSAL_NUM = 2;
	public static final int PM_PROPOSAL_VAL = 3;
	public static final int PM_CLIENT_CMD_LIST = 4;
	public static final int PM_CLIENT_ID = 5;
	public static final int PM_INSTANCE_ID = 6;
	public static final int PM_HIGH_ACCEPT_PROP_NUM = 7;
	public static final int PM_HIGH_ACCEPT_PROP_VAL = 8;
	public static final int PM_RESP_TO_CLIENT = 9; 
	//public static final int 
	

}
